<?php
/**
 * Created by PhpStorm.
 * User: yyq
 * Date: 2018/9/18
 * Time: 22:20
 */

namespace Common\Model;


class SystemMsgModel extends CommonModel
{
    const READ_NO = 'no';//未读
    const READ_YES = 'yes';//已读
    /**
     * 添加一条系统消息
     * @param $mid
     * @param $content
     * @param string $status
     * @return mixed
     */
    public function addOne($mid, $content, $status = 'no') {
        $data = array(
            'content' => $content,
            'mid' => $mid,
            'status' => $status,
            'create_time' => date('Y-m-d H:i:s'),
        );
        pushMess($content, [$mid]);
        return $this->add($data);
    }
}